diff -Naur xarchon-0.60.orig/acinclude.m4 xarchon-0.60/acinclude.m4
--- xarchon-0.60.orig/acinclude.m4	2002-01-09 13:34:33.000000000 -0500
+++ xarchon-0.60/acinclude.m4	2016-08-10 15:44:42.085582512 -0400
@@ -176,13 +176,13 @@
 QT_LDFLAGS="-L $qtdir/lib"
 CFLAGS="$CFLAGS $QT_INCLUDES"
 LDFLAGS="$LDFLAGS $QT_LDFLAGS"
-AC_CHECK_LIB(qt, qVersion__Fv, [
+AC_CHECK_LIB(qt-mt, qt_C_sigchldHnd, [
   AC_PATH_PROG(MOC, moc, notfound, $PATH:$qtdir/bin)
   if test "x$MOC" = xnotfound; then
      AC_MSG_WARN([Moc is missing;  the Qt interface will not be built])
      [$3]
   else
-     QT_LDFLAGS="$QT_LDFLAGS -lqt"
+     QT_LDFLAGS="$QT_LDFLAGS -lqt-mt -lX11"
      AC_SUBST(QT_INCLUDES)
      AC_SUBST(QT_LDFLAGS)
      [$2]
diff -Naur xarchon-0.60.orig/aclocal.m4 xarchon-0.60/aclocal.m4
--- xarchon-0.60.orig/aclocal.m4	2002-01-09 13:34:33.000000000 -0500
+++ xarchon-0.60/aclocal.m4	2016-08-10 15:44:49.089582758 -0400
@@ -189,13 +189,13 @@
 QT_LDFLAGS="-L $qtdir/lib"
 CFLAGS="$CFLAGS $QT_INCLUDES"
 LDFLAGS="$LDFLAGS $QT_LDFLAGS"
-AC_CHECK_LIB(qt, qVersion__Fv, [
+AC_CHECK_LIB(qt-mt, _Z8qVersionv, [
   AC_PATH_PROG(MOC, moc, notfound, $PATH:$qtdir/bin)
   if test "x$MOC" = xnotfound; then
      AC_MSG_WARN([Moc is missing;  the Qt interface will not be built])
      [$3]
   else
-     QT_LDFLAGS="$QT_LDFLAGS -lqt"
+     QT_LDFLAGS="$QT_LDFLAGS -lqt-mt"
      AC_SUBST(QT_INCLUDES)
      AC_SUBST(QT_LDFLAGS)
      [$2]
diff -Naur xarchon-0.60.orig/data/Makefile.am xarchon-0.60/data/Makefile.am
--- xarchon-0.60.orig/data/Makefile.am	2002-01-09 13:34:33.000000000 -0500
+++ xarchon-0.60/data/Makefile.am	2016-08-11 06:10:28.727404448 -0400
@@ -11,8 +11,8 @@
 	   echo "--> Installing theme '$$theme'"; \
 	   THEME_DIRS=`find $$theme -type d`; \
 	   for p in $$THEME_DIRS; do \
-	      echo "mkdir $(pkgdatadir)/$$p"; \
-	      mkdir $(pkgdatadir)/$$p; \
+	      echo "mkdir -p $(DESTDIR)$(pkgdatadir)/$$p"; \
+	      mkdir -p $(DESTDIR)$(pkgdatadir)/$$p; \
 	   done; \
 	   THEME_FILES=`find $$theme -type f`; \
 	   for p in $$THEME_FILES; do \
diff -Naur xarchon-0.60.orig/src/Genetic.hpp xarchon-0.60/src/Genetic.hpp
--- xarchon-0.60.orig/src/Genetic.hpp	2002-01-09 13:34:33.000000000 -0500
+++ xarchon-0.60/src/Genetic.hpp	2016-08-11 06:02:50.212388366 -0400
@@ -1,6 +1,7 @@
 #ifndef GENETIC_HPP
 #define GENETIC_HPP
 
+#include <cstdlib>
 #include <list>
 using namespace std;
 
@@ -216,9 +217,9 @@
   virtual Genetic_Operator<T> *Choose_Operator(void)
   {
     int max=(int)total_op_weight;
-    list<Genetic_Operator<T> *>::iterator start=operators.begin();
-    list<Genetic_Operator<T> *>::iterator end=operators.end();
-    list<Genetic_Operator<T> *>::iterator iter;
+    typename list<Genetic_Operator<T> *>::iterator start=operators.begin();
+    typename list<Genetic_Operator<T> *>::iterator end=operators.end();
+    typename list<Genetic_Operator<T> *>::iterator iter;
     int r=rand()%max;
     int count=0;
     for (iter=start;iter!=end;iter++) {
@@ -264,7 +265,7 @@
 	cur_size++;
       }
     }
-    newpop->Eval_Fitness(fit_func);
+    newpop->Eval_Fitness(this->fit_func);
     return newpop;
   }
 
diff -Naur xarchon-0.60.orig/src/Problem.hpp xarchon-0.60/src/Problem.hpp
--- xarchon-0.60.orig/src/Problem.hpp	2002-01-09 13:34:33.000000000 -0500
+++ xarchon-0.60/src/Problem.hpp	2016-08-11 05:59:58.156382332 -0400
@@ -306,14 +306,14 @@
   virtual G Goal_Value(T *a)
   {
     if (depth==0) 
-      return tester->Goal_Value(a);
+      return this->tester->Goal_Value(a);
     
-    Goal_Test<G,T> *endtester=tester;
-    tester=new Minimax_Goal_Test(depth-1,generator,other_acc,goal_acc,tester);
+    Goal_Test<G,T> *endtester=this->tester;
+    this->tester=new Minimax_Goal_Test(depth-1,this->generator,other_acc,this->goal_acc,this->tester);
     G ret_val=Successor_Goal_Test<G,T>::Goal_Value(a);
-    delete tester;
-    tester=endtester;
-    delete next;
+    delete this->tester;
+    this->tester=endtester;
+    delete this->next;
 
     return ret_val;
   }
@@ -340,19 +340,19 @@
   
   virtual G Goal_Value(T *a)
   {
-    Goal_Accumulator <G,T> *old=goal_acc;
+    Goal_Accumulator <G,T> *old=this->goal_acc;
     Multi_Goal_Accumulator <G,T,greater<G> > *mga=new Multi_Goal_Accumulator<G,T,greater<G> >(branch);
-    goal_acc=mga;
+    this->goal_acc=mga;
     Successor_Goal_Test<G,T>::Goal_Value(a);
-    goal_acc=old;
+    this->goal_acc=old;
     for (mga->Init();!mga->IsEnd();mga->Next()) { 
       T *state=mga->Get_State();
-      Multi_Minimax_Goal_Test *next=new Multi_Minimax_Goal_Test(d-1,b,gen,other,goal_acc,tester);
+      Multi_Minimax_Goal_Test *next=new Multi_Minimax_Goal_Test(this->d-1,this->b,this->gen,other,this->goal_acc,this->tester);
       next->Goal_Value(state);
-      goal_acc->Put(accumulator->value,acc->state,acc->op);
+      this->goal_acc->Put(this->accumulator->value,this->acc->state,this->acc->op);
     }
-    goal_acc->Put(mga->Get_State(),mga->Get_Operator(),mga->Get_Result());
-    return goal_acc->Get_Value();
+    this->goal_acc->Put(mga->Get_State(),mga->Get_Operator(),mga->Get_Result());
+    return this->goal_acc->Get_Value();
   }
 };
 
diff -Naur xarchon-0.60.orig/src/Xarchon_Problem.cpp xarchon-0.60/src/Xarchon_Problem.cpp
--- xarchon-0.60.orig/src/Xarchon_Problem.cpp	2002-01-09 13:34:33.000000000 -0500
+++ xarchon-0.60/src/Xarchon_Problem.cpp	2016-08-11 06:03:37.472390024 -0400
@@ -1,3 +1,4 @@
+#include <cstring>
 #include "Xarchon_Problem.hpp"
 #include "Xarchon_Interface.hpp"
 
diff -Naur xarchon-0.60.orig/src/board.h xarchon-0.60/src/board.h
--- xarchon-0.60.orig/src/board.h	2002-01-09 13:34:33.000000000 -0500
+++ xarchon-0.60/src/board.h	2016-08-10 16:20:27.874657772 -0400
@@ -98,7 +98,6 @@
 /*--------------------------------------------------------------------------*/
 
 extern int board_turn;
-extern int board_frame_time;
 extern CELL board_cells[BOARD_YCELLS][BOARD_XCELLS];
 extern int spell_avails[3][SPELL_COUNT_2]; /* row 0 is light, row 1 is dark */
 extern int init_board_cells[NUM_GAMES][BOARD_YCELLS][BOARD_XCELLS];
diff -Naur xarchon-0.60.orig/src/qt/qtplayersdialog.h xarchon-0.60/src/qt/qtplayersdialog.h
--- xarchon-0.60.orig/src/qt/qtplayersdialog.h	2002-01-09 13:34:33.000000000 -0500
+++ xarchon-0.60/src/qt/qtplayersdialog.h	2016-08-10 16:18:46.872654229 -0400
@@ -5,9 +5,9 @@
 #ifndef __MY_QT_PLAYERS_DIALOG_H
 #define __MY_QT_PLAYERS_DIALOG_H
 
+#include "iface.h"
 #include <qdialog.h>
 
-struct IFACE_PLAYER;
 class QtPlayerWidget;
 class QButtonGroup;
 
